package com.thread.practice;

public class ChangeNewThread extends Thread {
	public ChangeNewThread() {
		super("Demo Thread");
		System.out.println("非主线程:" + this);
		start();
	}

	@Override
	public void run() {
		for (int i = 0; i < 15; i++) {
			System.out.println("非主线程：" + i);
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {
				System.out.println("非主线程休眠时被其他线程试图中断");
			}

		}
		System.out.println("非主线程关闭");
	}
}
